export default /* glsl */`
varying vec2 uv2;

void main() {
    vec4 pos = vec4( position, 1.0 );
    gl_Position = projectionMatrix * modelViewMatrix * pos;

    float planeConstant = -dot(normal, position);
    float planeToEyeDist = abs(dot(normal, cameraPosition) + planeConstant);
    float scale = planeToEyeDist;
    vec2 a = vec2(gl_Position.x / scale, gl_Position.y / scale);
    // 标准设备坐标[-1, 1] 转换为 [0, 1]
    uv2 = (a + 1.0) * 0.5;
}
    `;
